#include "SMPPSourceNetworkId.hpp"

using namespace smpp::pdu;

SourceNetworkId::SourceNetworkId(const CoctetString &nValue):
TLV(TLVtags::TAG_SOURCE_NETWORK_ID,nValue.size()),_Value(nValue){}

SourceNetworkId::SourceNetworkId(const SourceNetworkId &nSourceNetworkId):
TLV(nSourceNetworkId),_Value(nSourceNetworkId.getValue()){}

bool SourceNetworkId::operator ==(
	const SourceNetworkId &nSourceNetworkId) const{
	return (TLV::operator == (nSourceNetworkId) && 
	_Value == nSourceNetworkId.getValue());
}

bool SourceNetworkId::operator !=(
	const SourceNetworkId &nSourceNetworkId) const{
	return !this->operator == (nSourceNetworkId);
}

SourceNetworkId &SourceNetworkId::operator = (
	const SourceNetworkId &nSourceNetworkId){
	if(*this == nSourceNetworkId)
		return *this;
	TLV::operator = (nSourceNetworkId);
	_Value = nSourceNetworkId.getValue();
	return *this;
}

void SourceNetworkId::setValue(const CoctetString &nValue){
	_Value = nValue;
}

const CoctetString &SourceNetworkId::getValue() const{
	return _Value;
}
